package com.cy.pj.common.pojo;

public class ResponseResult {
    /*响应状态码*/
    private Integer state=1;// 1表示ok，0表示error
    /*响应状态码对应的具体信息*/
    private String message="ok";
    /*响应数据（一般是查询时获取到的正确数据）*/
    private Object date;

    public ResponseResult(String message){
        this.message=message;
    }

    public ResponseResult(Object date){
        this.date=date;
    }

    public ResponseResult(Throwable e){
        this.state=0;
        this.message=e.getMessage();
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getDate() {
        return date;
    }

    public void setDate(Object date) {
        this.date = date;
    }
}
